﻿using BP.DA;
using BP.En;
using BP.Sys;
using BP.WF.Template.Frm;
using NPOI.OpenXmlFormats.Dml;
using System.Data;

namespace BP.Sys.Printer
{
    /// <summary>
    /// 从表
    /// </summary>
    public class DBDtl
    {
        /// <summary>
        /// 编号
        /// </summary>
        public string No = null;
        /// <summary>
        /// 名称
        /// </summary>
        public string Name = null;
        /// <summary>
        /// 数据
        /// </summary>
        public DataTable HisDB= null;
        /// <summary>
        /// 从表
        /// </summary>
        public DBDtl() { }
    }
    /// <summary>
    /// 从表s
    /// </summary>
    public class DBDtls : System.Collections.CollectionBase
    {
        /// <summary>
        /// 从表s
        /// </summary>
        public DBDtls()
        {
        }
        /// <summary>
        /// 获得数据元素
        /// </summary>
        /// <param name="refFrmID"></param>
        /// <param name="attrKey"></param>
        /// <returns></returns>
        public DBDtl GetValByKey(string dtlNo)
        {
            foreach (DBDtl item in this.InnerList)
            {
                if (item.No.Equals(dtlNo))
                    return item;
            }
            return null;
        }
        /// <summary>
        /// 增加从表
        /// </summary>
        /// <param name="en"></param>
        public void Add(DBDtl en)
        {
            this.InnerList.Add(en);
        }
    }

}
